﻿using System;
using System.Data;
using System.Data.SqlClient;

namespace PDO.DataPersistence.ServiceProvider
{
    public interface IDataObjectSourceProvider: IDisposable
    {
        bool TestConnection();

        DataSet ExecuteDataSet(DataRequest dataRequest);
        int ExecuteNonQuery(DataRequest dataRequest);
        object ExecuteScalar(DataRequest dataRequest);

        void BeginTransaction(string transactionid);
        void CommitTransaction(string transactionid);
        void RollbackTransaction(string transactionid);

        int TransactionTimeout { get; }
    }
}
